<h1> List post </h1>
<p>
	<a href="add"> tạo mơi </a>
</p>
<table>
	<tr>
		<th>ID</th>
		<th>Title</th>
		<th>Content</th>
		<th>Created</th>
		<th>Updated</th>
	<tr>
	<?php foreach	($posts as $post): ?>
	<tr>
		<?php
			$create = new DateTime($post['Chung']['CREATE_DATE']);
			$update = new DateTime($post['Chung']['UPDATE_DATE']);
		?>
		<td> <?php echo "<a href='view/".$post['Chung']['ID']."'>".$post['Chung']['ID']."</a>"; ?> </td>
		<td> <?php echo $post['Post']['TITLE']; ?> </td>
		<td> <?php echo $post['Chung']['CONTENT']; ?> </td>
		<td> <?php echo date_format($create, 'd/m/Y'); ?> </td>
		<td> <?php echo date_format($update, 'd/m/Y'); ?> </td>
		<td> <?php echo "<a href='edit/".$post['Chung']['ID']."' Chỉnh sưa </a>" ?>;
	</tr>
	<?php endforeach; ?>
	<?php unset($post); ?>
</table>